//
// 跨平台定时器框架
// Created by kenny on 25-11-6.
//

#ifndef PLATFORM_TIMER_H
#define PLATFORM_TIMER_H

#include <stdbool.h>

typedef struct platform_timer_s platform_timer_t;

// 平台定时器操作接口
typedef struct {
    platform_timer_t* (*create)(unsigned int interval_sec);
    bool (*start)(platform_timer_t* timer);
    bool (*stop)(platform_timer_t* timer);
    void (*destroy)(platform_timer_t* timer);
    void (*wait)(platform_timer_t* timer);
} platform_timer_ops_t;

// 获取平台特定的定时器操作
const platform_timer_ops_t* get_platform_timer_ops(void);
#endif //PLATFORM_TIMER_H
